﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Domain.Entity
{
    public class Admins : EntityBase
    {
        public override void Fill(System.Data.IDataReader idr, IList<string> fields)
        {
            if (fields.Contains("ID"))
            {
                this.ID = Convert.ToInt32(idr["ID"]);
            }
            if (fields.Contains("User") && idr["User"] != DBNull.Value)
            {
                this.User = Convert.ToString(idr["User"]);
            }
            if (fields.Contains("Power") && idr["Power"] != DBNull.Value)
            {
                this.Power = Convert.ToString(idr["Power"]);
            }
            if (fields.Contains("Sex") && idr["Sex"] != DBNull.Value)
            {
                this.Sex = Convert.ToString(idr["Sex"]);
            }
        }

        #region Columns
        /// <summary>
        /// 记录ID
        /// </summary>
        public int ID { get; set; }
        /// <summary>
        /// 用户名称
        /// </summary>
        public string User { get; set; }
        /// <summary>
        /// SET类型：可传数字，也可传字符
        /// </summary>
        public string Power { get; set; }
        /// <summary>
        /// Enum类型：可传数字，也可传字符
        /// </summary>
        public string Sex { get; set; }
        #endregion
    }
}
